package com.piece.admin.model;

import com.piece.core.framework.annotation.translate.DicTranslate;
import com.piece.core.framework.support.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@NoArgsConstructor
@Table(name = "tb_sys_post")
@ApiModel(value = "岗位信息表: tb_sys_post")
public class TbSysPost extends BaseEntity implements Serializable {

    @Id
    @Column(name = "post_id", length = 11)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "主键")
    private Long postId;

    @Column(name = "post_code", length = 64)
    @ApiModelProperty(value = "岗位编码")
    private String postCode;

    @Column(name = "post_name", length = 50)
    @ApiModelProperty(value = "岗位名称")
    private String postName;

    @Column(name = "post_sort", length = 4)
    @ApiModelProperty(value = "岗位排序")
    private String postSort;

    @Column(name = "status", length = 1)
    @ApiModelProperty(value = "状态", notes = "0=正常,1=删除,2=停用")
    private String status;

    @Transient
    @ApiModelProperty(value = "状态")
    @DicTranslate(source = "status", dicType = "sys_normal_disable")
    private String statusName;

    @Column(name = "remark", length = 500)
    @ApiModelProperty(value = "备注")
    private String remark;
}
